/**新任务 进行中 已完成 已放弃 四个任务栏列表 */
import React from 'react';
import './index.less';
import TaskList from './TaskList';
import {connect} from 'react-redux';
import {get_day_task} from '../../redux/action/actions';

const CTaskList = (props) => {
  let nullData = {
    newTask: [],
    onGoing: [],
    finished: [],
    abandoned: [],
  }
  let listData = props.get_day_task_reducer.task || nullData;
  return (
    <div className="ctasklist_wrap">
      <TaskList data={listData.newTask} title="New Task" />
      <TaskList data={listData.onGoing} title="On Going" />
      <TaskList data={listData.finished} title="Finished" />
      <TaskList data={listData.abandoned} title="Abandoned" />
    </div>
  )
}

export default connect(
  state => state,
  {get_day_task}
)(CTaskList);
